<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    #box {
        width: 200px;
        height: 200px;
        background-color: #ccc;
    }
    </style>
</head>
<body>
    <button id="btn"> 点 击 </button>
    <div id="box"></div>

    <script>
        var btn = document.getElementById('btn');
        var isChange = true;
        btn.onclick = function() {
            var box = document.getElementById('box');
            if (isChange === true) {
                box.style.width = '400px';
                box.style.height = '400px';
                box.style.position = 'absolute';
                box.style.left = '200px';
                box.style.top = '200px';
                isChange = false;
            } else {
                box.style.width = '';
                box.style.height = '';
                box.style.position = '';
                box.style.left = '';
                box.style.top = '';
                isChange = true;
            }
        }
    </script>
</body>
</html>